package com.faner.fast.common.controller;//package com.faner.fast.controller.common;
//
//import com.faner.fast.rabbitmq.amqp.service.OrderService;
//import com.faner.fast.rabbitmq.mq.SendMessage;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.RequiredArgsConstructor;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.HashMap;
//
//@Validated
//@RestController
//@RequestMapping("/rabbitmq")
//@RequiredArgsConstructor
//@Api(value = "rabbitmq", tags = "工具:rabbitmq")
//public class RabbitmqController {
//    @Autowired
//    private OrderService orderService;
//    @Autowired
//    private SendMessage sendMessage;
//
//    @ApiOperation("根据购物车信息生成订单")
//    @RequestMapping(value = "/generateOrder", method = RequestMethod.POST)
//    public Object generateOrder() throws Exception {
//        return orderService.generateOrder();
//    }
//
//    @RequestMapping(value = "/hello", method = RequestMethod.GET)
//    public String test() throws Exception{
//        //sendMessage.sendMessage("", "confirm_test_queue", "0" )
//        for (int i = 0; i < 1; i++) {
//            sendMessage.sendMessage("", "confirm_test_queue",  "发送者消息"+i,new HashMap<>());
////            sendMessage.sendMessage("exchange-1",
////                    "springboot.rabbit",  "发送者消息"+i,new HashMap<>());
//        }
//        return "success";
//    }
//}
